package fanxing;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Properties;

public class Test {

	public static void main(String[] args) throws Exception {
		 
		Properties prop = new Properties();     
	 
		//读取属性文件a.properties
		File file=new File("info.properties");
		InputStream in =new FileInputStream(file);
		prop.load(in);     ///加载属性列表
		
		
		String age=prop.getProperty("age");
		String uname=prop.getProperty("name");
		String cname=prop.getProperty("class");
		System.out.println(age);
		System.out.println(uname);
		System.out.println(cname);
	}

}
